﻿using System.Collections;
using System.Text;
using SimpleJSON;

namespace ROSBridgeLib {
    namespace std_msgs {
        public class Float32Msg : ROSBridgeMsg {
            private sbyte _data;

            public Float32Msg(JSONNode msg) {
                _data = sbyte.Parse(msg["data"]);
            }

            public Float32Msg(sbyte data) {
                _data = data;
            }

            public static string GetMessageType() {
                return "std_msgs/Float32";
            }

            public sbyte GetData() {
                return _data;
            }

            public override string ToString() {
                return "Float32 [data=" + _data + "]";
            }

            public override string ToYAMLString() {
                return "{\"data\" : " + _data + "}";
            }
        }
    }
}


